package hospital.repository;

import hospital.model.hosp.Schedule;
import org.joda.time.DateTime;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author
 * @description: 排班接口
 */
@Repository
public interface ScheduleRepository extends MongoRepository<Schedule,String> {
    Schedule getScheduleByHoscodeAndDepcodeAndHosScheduleId(String hoscode, String depcode, String hosScheduleId);

    //根据hoscode hosScheduleId 删除科室信息
    Schedule getScheduleByHoscodeAndHosScheduleId(String hoscode, String hosScheduleId);

    //根据医院编号hoscode 科室编号depcode 工作日期workDate查询出排班的详情
    List<Schedule> findScheduleByHoscodeAndDepcodeAndWorkDate(String hoscode, String depcode, DateTime toDateTime);

    // 根据排班编号查询科室信息
    Schedule getScheduleByHosScheduleId(String scheduleId);
}
